<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>


<script>
    //创建标签
    let d = document.createElement("div");
    //给div设置显示文本
    d.innerText = "我是div";
    //把div添加到body中
    document.body.appendChild(d)

    let h1 = document.createElement("h1");
    h1.innerText = "我是h1";
    document.body.appendChild(h1)
    let h2 = document.createElement("h2");
    h2.innerText = "我是h2";
    document.body.appendChild(h2)

    //创建图片标签并引入图片
    let img = document.createElement("img");
    //给元素设置属性
    img.src="../day3_Img/1.png";
    //添加到页面中
    document.body.appendChild(img)

</script>



</body>
</html>